CC = gcc
CFLAGS = -O2

# default defines
# DEFINES = -DSTREAM_TYPE=double -DSTREAM_ARRAY_SIZE=10000000 -DNTIMES=10 -DOFFSET=0

DEF_TYPE = double
DEF_SIZE = 10000000
DEF_TIMES = 10
DEF_OFF = 0

#DEFINES += -DSTREAM_TYPE=$(DEF_TYPE) -DSTREAM_ARRAY_SIZE=$(DEF_SIZE) -DNTIMES=$(DEF_TIMES) -DOFFSET=$(DEF_OFF) -DVERBOSE -DTUNED
DEFINES += -DSTREAM_TYPE=$(DEF_TYPE) -DSTREAM_ARRAY_SIZE=$(DEF_SIZE) -DNTIMES=$(DEF_TIMES) -DOFFSET=$(DEF_OFF)

all: stream_c.exe stream_omp.exe

stream_c.exe: stream.c
	$(CC) $(CFLAGS) $(DEFINES) stream.c -o stream_c.exe

stream_omp.exe: stream.c
	$(CC) $(CFLAGS) $(DEFINES) -fopenmp stream.c -o stream_omp.exe

clean:
	rm -f stream_*.exe *.o
